const mongoose = require('mongoose');
let DB = mongoose.connect('mongodb://localhost/productsys');
// 接受链接数据的操作
DB.then(() => {
    console.log('链接数据库成功');
}, () => {
    console.log('链接数据库失败');
})